import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86132
 * Date: 2022-04-27
 * Time: 18:24
 */
public class Test {
    //计算每个月兔子的总数
    import java.util.*;
    public class Main{
        public static void main(String[]args){
            Scanner sc=new Scanner(System.in);
            while(sc.hasNext()){//多组输入
                int m=sc.nextInt();
                System.out.println(num(m));

            }
        }
        public static int num(int m){
            if(m<=2){
                return 1;
            }
            return num(m-1)+num(m-2);
        }
    }
}
